import request from '@/utils/request'

// 获取集群列表
export function fetchClusterList(data) {
  return request({
    url: '/api/host/queryAllCluster',
    method: 'get',
    data
  })
}

// 通过集群名称查询服务部署图
export function fetchDeployDiagram(query) {
  return request({
    url: '/api/deployDiagram/query',
    method: 'get',
    params: query
  })
}

// 通过集群查询主机信息列表
export function fetchHostByCluster(query) {
  return request({
    url: '/api/host/queryHostByCluster',
    method: 'get',
    params: query
  })
}

// 保存服务部署图
export function saveDeployDiagram(data) {
  return request({
    url: '/api/deployDiagram/save',
    method: 'put',
    data
  })
}
